# -*- coding: utf-8 -*-
# @Time : 2023/11/30 8:17
# @Author : 王薪超
# @Email : 1517113428@qq.com
# @File : page_wxc_share.py
# @Project : wxczzb

from common.base_page import BasePage
from appium.webdriver.common.appiumby import AppiumBy
from time import sleep

from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

class Share(BasePage):
    btn_desktop_market = (AppiumBy.ID,'com.jhss.youguu:id/btn_desktop_market')#行情
    tv_self_stock_cur_price = (AppiumBy.ID,'com.jhss.youguu:id/tv_self_stock_cur_price')#选择股票
    iv_share = (AppiumBy.ID,'com.jhss.youguu:id/iv_share')#分享
    tv_share_wechat = (AppiumBy.ID,'com.jhss.youguu:id/tv_share_wechat')#微信
    # toast_el = (AppiumBy.XPATH, "//*[@text= '目前您的微信版本过低或未安装微信，需要安装微信才能使用']")
    def share_page(self):
        self.click_ele(self.btn_desktop_market)#点击行情
        sleep(2)
        self.click_ele(self.tv_self_stock_cur_price)#选择一个股票
        sleep(2)
        self.tap(150,1000)
        self.click_ele(self.iv_share)#点击分享
        sleep(2)
        self.click_ele(self.tv_share_wechat)#选择微信分享
        sleep(2)
